package com.ebupt.migu.music.effectStatistics.schedule;

import com.ebupt.migu.music.effectStatistics.service.SMSOperationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author tz
 */
@Slf4j
@Component
@EnableScheduling
public class SmsTask {

    @Autowired
    private SMSOperationService smsOperationService;

    /**
     *  定时任务
     */
    @Scheduled(cron = "${sms.httpResult}")
    public void updateResult(){
        log.info("定时任务短信统计开始");
        smsOperationService.smsResultTask();
    }

}
